/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.mldn.demo;

/**
 *
 * @author Administrator
 */
public class AdapterDemo {
    public static void main(String[] args) {
        Window win = new WindowImpl();
        win.open();
        win.close();
    }
}

interface Window{
    public void open();
    public void close();
    public void activated();
    public void iconified();
    public void deiconified();
}

abstract class WindowAdapter implements Window{

    public void activated() {
        
    }

    public void close() {
        
    }

    public void deiconified() {
        
    }

    public void iconified() {
        
    }

    public void open() {
        
    }
    
}

class WindowImpl extends WindowAdapter{

    @Override
    public void close() {
        System.out.println("window close");
    }

    @Override
    public void open() {
        System.out.println("window open");
    }
    
}
